package com.itheima.ArrayList;

import java.util.ArrayList;

public class Demo02ArrayList {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        list.add("111");
        list.add("222");
        list.add("333");
        list.add("444");
        list.add("555");

        //testRemove(list);
        //testSet(list, list.set(1, "vvv"));

        String s = list.get(1);
        System.out.println(s);
        int size = list.size();
        System.out.println("size = " + size);
    }

    private static void testSet(ArrayList<String> list, String vvv) {
        String s = vvv;
        System.out.println("s = " + s);
        System.out.println("list = " + list);
    }

    private static void testRemove(ArrayList<String> list) {
        boolean b1 = list.remove("111");
        System.out.println(b1);
        System.out.println("list = " + list);

    }
}
